<section class="actionsBtn clearfix">

    <div class="pull-left actions-btn-left">
        <div class="pull-left btn-group">
            <a class="btn btn-sm btn-default" href="javascript:history.back();"><i class="fa fa-arrow-left"></i></a>
            <a class="btn btn-sm btn-default" href="" ng-click="$parent.doPageRefresh()"><i class="fa fa-refresh"></i></a>
            <a class="btn btn-sm btn-default" href="javascript:history.forward();"><i class="fa fa-arrow-right"></i></a>
            
        </div>
        <div class="pull-left btn-group">
            <a class="btn btn-sm btn-default" ng-click="showFiltersModal();" ng-show="showFilters||selectAble" ng-class="{'disabled': !showFilters}">
                <i class="fa fa-search"></i>
                <span ng-bind="'lang.actions.filters'|lang"></span>
            </a>
            <button data-toggle="dropdown" class="btn btn-sm btn-danger dropdown-toggle" ng-show="selectAble" ng-class="{disabled: !gridSelected.length, 'btn-primary': gridSelected.length}">
                {{'lang.selected_action'|lang|sprintf:gridSelected.length}}
                <i class="fa fa-caret-down fa-on-right"></i>
            </button>
            <ul class="dropdown-menu dropdown-primary pull-right">
                <li class="{{sa.class}}"
                    ng-show="gridSelected.length === 1 || sa.multi"
                    ng-class="{disabled: !gridSelected.length||(!sa.multi&&(gridSelected.length!=1))}"
                    ng-repeat="sa in selectedActions track by $index">
                    <a ng-click="sa.action($event,gridSelected)">
                        <i class="fa fa-{{sa.icon}}"></i>
                        {{sa.label}}
                    </a>
                </li>
            </ul>
        </div>
        <!--//workflow in detail page-->
        <div class="pull-left btn-group" ng-show="workflowInBill !== undefined">
            <button class="btn btn-sm btn-primary" ng-click="doViewWorkflowProcesses(formMetaData)">{{'lang.workflow'|lang}}</button>
            <button class="btn btn-sm btn-{{w.btn_class||'success'}}"
                    ng-repeat="w in workflowInBill track by $index"
                    ng-bind="w.name"
                    ng-click="doWorkflow($event, w.id, mainrow_id)"
                    ></button>
        </div>

        <!--//workflow-->
        <div class="pull-left  btn-group" ng-hide="false === selectAble">
            <button data-toggle="dropdown" class="btn btn-success btn-sm dropdown-toggle" ng-show="workflowAble">
                {{'lang.workflow'|lang}}
                <span class="fa fa-caret-down fa-on-right"></span>
            </button>
            <ul class="dropdown-menu dropdown-success pull-right">
                <li>
                    <a ng-click="doViewWorkflowProcesses()" ng-bind="'lang.actions.viewWorkflowProcess'|lang"></a>
                </li>
                <li ng-repeat="w in workflowActionList" ng-class="{disabled: workflowActionDisabled(w.id)}">
                    <a ng-click="doWorkflow($event, w.id);">{{w.name}}</a>
                </li>
            </ul>
        </div>

        <!--//search box-->
        <div class="input-group pull-left actions-search-box" ng-show="searchAble">
            <input type="text" placeholder="Search ..." id="gridSearchInput" class="nav-search-input" ng-model-options="{ debounce: 300 }" ng-model="filterOptions.filterText" autocomplete="off" autofocus />
            <span class="input-group-addon"><i class="fa fa-search nav-search-icon"></i></span>
        </div>

    </div>

    <div class="pull-right">
        <div class="pull-right btn-group">
            <a class="btn btn-sm btn-{{pa.class|default:'primary'}}" ng-click="$root.goPage(pa.href)" ng-repeat="pa in pageActions track by $index">{{pa.label}}</a>
            <button class="btn btn-sm btn-danger" ng-click="doClearCachedData()" ng-show="showClearAutoSaved">
                <i class="fa fa-trash-o"></i>
            </button>
        </div>
    </div>


</section>